﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace pbvs.Models
{
    public class ContentPage
    {
        [Key]
        public int Id { get; set; }
        public string PageName { get; set; }
        public string Title { get; set; }
        public string Body { get; set; }
        public string MenuTitle { get; set; }
        public int? Parent { get; set; }
        public bool HideFromMenu { get; set; }

        [ForeignKey("Parent")]
        public virtual ICollection<ContentPage> Children { get; set; }

        [ForeignKey("Parent")]
        public virtual ContentPage ParentPage { get; set; }
    }
}